//
//  Common.swift
//  LZTWeibo
//
//  Created by Yin jianxun on 16/8/10.
//  Copyright © 2016年 YinJianxun. All rights reserved.
//

import UIKit

//切换跟控制器的通知名字
let WBNOTIFICATION = "WBNOTIFICATION"

//删除按钮 - textView的通知名字
let WBEMOTICONDELETEBTNNOTIFICATION = "WBEMOTICONDELETEBTNNOTIFICATION"

//表情按钮的点击 - textView的通知名字
let WBEMOTICONBTNNOTIFICATION = "WBEMOTICONBTNNOTIFICATION"

//AppKey
let WBAppKey = "1947728673"
let WBAppSecret = "55a5b10d02e07981ac500265714cd88c"

//开发者账号
let WBNAME = "13661375730"
let WBPassWd = "xunjianyin141386"

//回调页
let WBREDIRECT_URI = "http://www.baidu.com"

//设置 app的主体颜色
let AppThemeColor = UIColor.orangeColor()

//屏幕的宽度 和 高度
let SCREENW = UIScreen.mainScreen().bounds.width
let SCREENH = UIScreen.mainScreen().bounds.height

func RGB(red: CGFloat, green: CGFloat, blue: CGFloat, alpha: CGFloat = 1)-> UIColor  {
    
    return UIColor(red: red / 255, green: green / 255, blue: blue / 255, alpha: alpha)
    
}

func randomColor()-> UIColor {
    
    let r = CGFloat(random() % 256)
    let g = CGFloat(random() % 256)
    let b = CGFloat(random() % 256)
    
    return RGB(r, green: g, blue: b)
    
}
